emoji chooser: Avoid a crash
authorMatthias Clasen <mclasen@redhat.com>
Fri, 1 Sep 2017 23:51:17 +0000 (19:51 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 1 Sep 2017 23:55:21 +0000 (19:55 -0400)
The emoji chooser gets disposed already, because it is attached
to the toplevel as a popover. Doing it again when the object data
is cleared is leading to a crash.

https://bugzilla.gnome.org/show_bug.cgi?id=787103

gtk/gtkentry.c

index a1bbe6b189821c74281d589cd78bd8ab91024cab..0385a6e54d3cc775fc031a333ab8f18f6ba17e66 100644 (file)
@@ -9851,7 +9851,7 @@ gtk_entry_choose_emoji (GtkEntry *entry)
   if (!chooser)
     {
       chooser = gtk_emoji_chooser_new ();
-      g_object_set_data_full (G_OBJECT (entry), "gtk-emoji-chooser", chooser, (GDestroyNotify)gtk_widget_destroy);
+      g_object_set_data (G_OBJECT (entry), "gtk-emoji-chooser", chooser);
 
       gtk_popover_set_relative_to (GTK_POPOVER (chooser), GTK_WIDGET (entry));
       if (entry->priv->show_emoji_icon)